package com.adnaan.backend.entity;

import com.adnaan.backend.common.annotation.FileUrl;
import com.adnaan.backend.entity.dto.OptionDto;
import com.adnaan.backend.entity.dto.PictureListDto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * author: adnaan
 * create: 2025-02-03 13:42
 * Description:
 */
@Data
@Tag(name = "药材表")
@TableName("herbal_material")
@EqualsAndHashCode(callSuper = true)
public class Medicinal extends BaseEntity {

    @Schema(title = "名称", description = "")
    private String name;

    @Schema(title = "英文名称", description = "")
    private String nameEn;

    @Schema(title = "图片", description = "")
    @FileUrl
    private String cover;

    @Schema(title = "产地", description = "")
    private String origin;

    @Schema(title = "简介", description = "")
    private String introduction;

    @Schema(title = "禁忌", description = "")
    private Long tabooId;

    @Schema(title = "功效", description = "")
    @TableField(exist = false)
    private List<OptionDto> efficacy;

    @Schema(title = "图集封面", description = "")
    @TableField(exist = false)
    @FileUrl
    private String defaultPicture;

    @Schema(title = "禁忌", description = "")
    @TableField(exist = false)
    private HerbalTaboo taboo;

    @Schema(title = "图集", description = "")
    @TableField(exist = false)
    private List<PictureListDto> pictures;
}
